home *** CD-ROM | disk | FTP | other *** search
/ Champak 43 / Vol 43.iso / games / superdog.swf / scripts / DefineSprite_73_en7 / frame_2 / DoAction.as
Encoding:
Text File  |  2007-06-25  |  831 b   |  43 lines

  1. stop();
  2. onEnterFrame = function()
  3. {
  4.    if(_parent._parent.pauses == false)
  5.    {
  6.       if(this._x <= 0 and dix == false)
  7.       {
  8.          dix = true;
  9.       }
  10.       else if(this._x >= 580 and dix == true)
  11.       {
  12.          dix = false;
  13.       }
  14.       if(dix == false and atking == false)
  15.       {
  16.          this._x -= spd;
  17.          long += spd;
  18.          this._xscale = 100;
  19.       }
  20.       else if(dix == true and atking == false)
  21.       {
  22.          this._x += spd;
  23.          long += spd;
  24.          this._xscale = -100;
  25.       }
  26.       if(acted == false)
  27.       {
  28.          gotoAndStop("atk");
  29.          play();
  30.          acted = true;
  31.       }
  32.       if(acted == true)
  33.       {
  34.          act_i++;
  35.          if(act_i >= 80)
  36.          {
  37.             act_i = 0;
  38.             acted = false;
  39.          }
  40.       }
  41.    }
  42. };
  43.